package com.lh.aboutassert;

public class SimpleAssert {
	public static void main(String[] args) {
		try {
			Derived derived = new Derived();
//			derived.baseMethod();
			derived.derivedMethod();
		} catch (AssertionError ae) {
			System.out.println(ae);
			System.out.println("cc");
		}
	}

}

class Base {
	public void baseMethod() {
		assert false : "Assertion failed:This is base ";// 总是assertion失败
		System.out.println("Base Method");
	}
}

class Derived extends Base {
	public void derivedMethod() {
		assert true : "Assertion failed:This is derive";// 总是assertion失败
		System.out.println("Derived Method");
	}
}